import request from "@/utils/request"

export function queryPageProduct(data) {
  return request({
    url: "/CProduct/queryPage",
    method: "POST",
    data: data
  })
}

export function queryOneProduct(data) {
  return request({
    url: "/CProduct/queryOne",
    method: "GET",
    params: data
  })
}

export function insertProduct(data) {
  return request({
    url: "/CProduct/insert",
    method: "POST",
    data: data
  })
}

export function updateProduct(data) {
  return request({
    url: "/CProduct/update",
    method: "POST",
    data: data
  })
}

export function deleteProduct(data) {
  return request({
    url: "/CProduct/delete",
    method: "POST",
    data: data
  })
}

export function queryPageMaintenanceRecord(data) {
  return request({
    url: "/CMaintenanceRecords/queryPage",
    method: "POST",
    data: data
  })
}

export function insertMaintenanceRecord(data) {
  return request({
    url: "/CMaintenanceRecords/insert",
    method: "POST",
    data: data
  })
}

export function updateMaintenanceRecord(data) {
  return request({
    url: "/CMaintenanceRecords/update",
    method: "POST",
    data: data
  })
}

export function deleteMaintenanceRecord(data) {
  return request({
    url: "/CMaintenanceRecords/delete",
    method: "POST",
    data: data
  })
}

export function queryRuleList(data) {
  return request({
    url: "/CMembershipLevelRule/queryList",
    method: "GET",
    params: data
  })
}

export function queryRuleListByProd(data) {
  return request({
    url: "/CPoudctDiscountRule/queryRuleListByProd",
    method: "GET",
    params: data
  })
}

export function setProductDiscount(data) {
  return request({
    url: "/CPoudctDiscountRule/setProductDiscount",
    method: "POST",
    data: data
  })
}
